package com.service;

import javax.naming.NamingEnumeration;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * @description:
 * @author: lipy
 * @create: 2020-08-30 18:41
 **/

public class Lookup {
    public static void main(String[] args) throws RemoteException, MalformedURLException, NotBoundException {
        Remote lookup = Naming.lookup(RmiRegist.url);
        IHello rmiHello = (IHello)lookup;
        String client = rmiHello.sayHello("client");
        System.out.println(client);
    }
}
